package com.dream.technology.service;

import com.dream.technology.db.entity.RcRuleCollectionItem;
import com.dream.technology.db.entity.RcRuleCollectionItemQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RcRuleCollectionItemService {

    int countByExample(RcRuleCollectionItemQuery example);

    int deleteByExample(RcRuleCollectionItemQuery example);

    int deleteByPrimaryKey(Long id);

    int insert(RcRuleCollectionItem record);

    int insertSelective(RcRuleCollectionItem record);

    List<RcRuleCollectionItem> selectByExample(RcRuleCollectionItemQuery example);

    RcRuleCollectionItem selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") RcRuleCollectionItem record, @Param("example") RcRuleCollectionItemQuery example);

    int updateByExample(@Param("record") RcRuleCollectionItem record, @Param("example") RcRuleCollectionItemQuery example);

    int updateByPrimaryKeySelective(RcRuleCollectionItem record);

    int updateByPrimaryKey(RcRuleCollectionItem record);

    List<RcRuleCollectionItem> selectByCollectionId(Long id);

    /**
     * copy 指定collectionId的规则配置
     *
     * @param collectionId
     * @param newCollectionId
     * @return
     */
    String copy(Long collectionId, Long newCollectionId);

    /**
     * 批量插入
     *
     * @param record
     * @return
     */
    int insertList(List<RcRuleCollectionItem> record);
}
